# Maintainer: David Runge <dave@sleepmap.de>
# Contributor: speps <speps at aur dot archlinux dot org>
# Contributor: farid <farid at archlinux-br.org>

pkgname=libfishsound
pkgver=1.0.0
pkgrel=5
pkgdesc="A simple programming interface that wraps Xiph.Org audio codecs"
arch=('loong64' 'x86_64')
url="https://www.xiph.org/fishsound/"
license=('BSD')
depends=('libvorbis' 'speex' 'flac')
provides=('libfishsound.so')
source=("https://github.com/kfish/${pkgname}/archive/${pkgver}.tar.gz")
sha512sums=('52a98489d8cebfd92a1aa18511643108cc818379cf4470fe177c4a27e998f2652e4ffa94a50dd4f8838753714b9001eb8ee9ecb2fff858179f3bc7ffe6d7e35b')

prepare() {
  cd "${pkgname}-${pkgver}"
  ./autogen.sh
}

build() {
  cd "${pkgname}-${pkgver}"
  ./configure --prefix=/usr \
              --enable-static=no
  make
}

package() {
  cd "${pkgname}-${pkgver}"
  make DESTDIR="$pkgdir/" docdir=./docs install
  install -vDm 644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}"
  install -vDm 644 {AUTHORS,ChangeLog,NEWS,README} \
    -t "${pkgdir}/usr/share/doc/${pkgname}"
}
